<div class="razdel" id="content">
    	<div id="conteiner">
        	<div id="left">
            	<div id="leftCont">	
                	<div class="boeder">
                    	<table width="100%">
                          <tbody><tr>
                            <td valign="top">
															<%= link_to "ВЕРНУТЬСЯ К СПИСКУ ВСЕХ #{ @category ? 'ПРОДУКТОВ' : 'СТАТЕЙ' }", @category ? category_articles_path(@category) : articles_path%>
														</td>
                            <td align="center" valign="top" style="white-space: nowrap;">
															<%= link_to("предыдущая запись", @category ? category_article_path(@category, @prev_article) : article_path(@prev_article)) + " | " unless @prev_article.nil? %> 
															
															<% if logged_in? %>
                            		<%= link_to "добавить в избранное", new_user_feature_path(current_user, :featureable_type=>@article.class.to_s, :featureable_id=>@article.id) %>
                            	<% end %>
															<%=  " | " + link_to( "следующая запись", @category ? category_article_path(@category, @next_article) : article_path(@next_article)) unless @next_article.nil?%>
														</td>
                            <td align="right" valign="top">
															<%= link_to "ВЕРНУТЬСЯ К КАТЕГОРИЯМ РАЗДЕЛА", category_path(@category.parent) if @category%><a href="#"></a>
														</td>
                          </tr>
                        </tbody></table>
                        <div class="pointerBlock">
                        	<div class="content">
                        		<div style="color: rgb(0, 137, 225);" class="title"><%= @article.title %></div>
                                <small>
 																	(опубликовано <%= @article.created_at.strftime("%d.%m.%Y")%>)
																</small><br/>
																<%= Hpricot(@article.content).to_html%>
                            </div>
                        </div>
                        
                        <%= render :partial=>"includes/carousel", :object=>@article.images if @article.images.size > 0%>
                        <div style="clear:both;"></div>
                        <% if @map %>
		                      <div style="padding-left:37px;">
														<%= @map.to_html %>   
														<%= @map.div(:width => 540, :height => 200) %>
													</div>
													<% content_for :head, (GMap.header) %>
												<% end %>
                        <div style="clear:both;"></div><p></p>
                        <div>
                        	<strong>автор:</strong> <%= link_to @article.user.login, user_path(@article.user), :class=>"user"%>
                        </div>
                        <div style="padding-top: 5px;">
                        	<strong>метки:</strong> 
							<% @article.tag_list.each do |tag|%>
								 <%= link_to tag, { :action => :tag, :id => tag } %>
							<% end %>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
        <%= render :partial=>"right_block"%>
    </div>

	<% if @article.article_type == :article%>
		<div class="addComment" style="margin: 0px 30px 50px 70px;">
				<div style="padding: 5px 0px 25px;" class="addCommentButton"><a href="#comment-form" onclick="$('div-comment-form').show()" >Добавить коментарий</a></div>
				
				<%= render :partial=>"comments/comments", :locals=>{:record=>@article, :comments => @article.comments} %>
				
				<% if @article.comments.size > 0 %>
				  <div style="padding: 25px 0px 5px;" class="addCommentButton"><a href="#comment-form" onclick="$('div-comment-form').show()">Добавить коментарий</a></div>
				<% end %>
				
				<%= render :partial=>"comments/form", :locals=>{:model=>@article} %>
		</div>
	 
	<% end %>
